import prisma from "@/libs/prisma";

export const getFoodTrucksList = async (params) => {
  try {
    const data = await prisma.foodTruck.findMany(params);
    return data;
  } catch (err) {
    return [];
  }
};

export const getFoodTruck = async (id) => {
  try {
    const data = await prisma.foodTruck.findUnique({
      where: {
        id: id,
      },
    });

    return data;
  } catch (err) {
    return {};
  }
};
